
import {createWebHistory,createRouter} from "vue-router";

const routes=[
    {
        path:"/",
        children:[
            {
                path:"/",
                name:"login",
                component:()=>import("../view/login/login.vue")
            },
                ]

    },
    {
        path:"/user",
        component:()=>import("@/view/users/mymain_user.vue"),
        children:[
            {
                path:"/repay",
                name:"repay",
                component:()=>import("@/view/users/repay/repay.vue")
            },
            {
                path:"/bill",
                name:"bill",
                component:()=>import("@/view/users/bill/bill.vue")
            },
            {
                path:"/home",
                name:"myhome",
                component:()=>import("@/view/users/home/myhome.vue")
            },

            {
                path:"/about",
                name:"about",
                component:()=>import("@/view/users/about/myabout.vue")
            },
            {
                path: "/user/user",
                name: "user",
                component: () => import("@/view/users/informaiton/information.vue")
            },
            {
                path: "/message",
                name: "message",
                component: () => import("@/view/users/message/message.vue")
            },
            ]
    },
    {
        path:"/admin",
        component:()=>import("@/view/admin/mymain/mymain_admin.vue"),
        children:[
            {
                path:"/",
                name:"adminhome",
                component:()=>import("@/view/users/home/myhome.vue")
            },
            {
                path: "/waterPrice",
                name: "WaterPrice",
                component: () => import("@/view/admin/price/MyWaterRate.vue")
            },
            {
                path: "/electricPrice",
                name: "ElectricPrice",
                component: () => import("@/view/admin/price/MyElectricRate.vue")
            },
            {
                path: "/Hydropower",
                name: "MyHydropower",
                component: () => import("@/view/admin/price/MyHydropower.vue")
            },
            {
                path: "/manager",
                name: "userManager",
                component: () => import("@/view/admin/userManager.vue")
            },
            ]
        }
    ]
const router=createRouter({
    history:createWebHistory(),
    routes
})

export default router